regular expression to dfa conversion